package com.bmps.springcloud.insuredmicroservice.model.accept;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * description:
 * 试算结果
 *
 * @author jackdaw
 * @date 2020-01-06 15:31
 */
public class ProcessModel implements Serializable {
    private static final long serialVersionUID = -4478671739565221871L;
    private int day;
    private int year;
    private BigDecimal amount;

    public int getDay() {
        return day;
    }

    public void setDay(int day) {
        this.day = day;
    }

    public int getYear() {
        return year;
    }

    public void setYear(int year) {
        this.year = year;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    @Override
    public String toString() {
        return "ProcessModel{" +
                "day=" + day +
                ", year=" + year +
                ", amount=" + amount +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }

        if (!(o instanceof ProcessModel)) {
            return false;
        }

        ProcessModel that = (ProcessModel) o;

        return new EqualsBuilder()
                .append(day, that.day)
                .append(year, that.year)
                .append(amount, that.amount)
                .isEquals();
    }

    @Override
    public int hashCode() {
        return new HashCodeBuilder(17, 37)
                .append(day)
                .append(year)
                .append(amount)
                .toHashCode();
    }
}
